 @SpringBootTest
class ConsumerMapperTest {

    @Autowired
    private ConsumerMapper consumerMapper;
    
    /**
     * 用户头像更新
     */
    @Test
    void consumerMapperUploadAvatar(){
        Consumer consumer = new Consumer();
        consumer.setId(75);
        consumer.setAvator("/img/avatorImages/" + "test.jpg");
        if (consumerMapper.updateById(consumer) > 0) {
            System.out.println("上传成功 = " + consumer.getAvator());
        } else {
            System.out.println("上传失败");
        }
    }
}
